Dress shirt CROATA Brijuni
610200-000057|40
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml" System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price) at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative) at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection) at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative) at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative) at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId) at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo) at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__52() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate() ClientConnectionId:018f0862-5ed5-493f-8ca1-b765324d3373 Error Number:9002,State:2,Class:17
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <span class="text-decoration-line-through js-text-decoration-line-through opacity-75 me-3 text-price js-text-price d-none" data-show-if="LiveProductInfo.product.Price.Price != LiveProductInfo.product.PriceBeforeDiscount.Price"></span> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 107 { 108 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 109 { 110 <span itemprop="price" content="" class="d-none"></span> 111 <span class="text-decoration-line-through js-text-decoration-line-through opacity-75 me-3 text-price js-text-price d-none" data-show-if="LiveProductInfo.product.Price.Price != LiveProductInfo.product.PriceBeforeDiscount.Price"></span> 112 } 113 else 114 { 115 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Error executing template "/Designs/Swift/Paragraph/DS_ProductAddToCart.cshtml" System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price) at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative) at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection) at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative) at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative) at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId) at System.Lazy`1.CreateValue() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy`1.get_Value() at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__48() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo) at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__49() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at CompiledRazorTemplates.Dynamic.RazorEngine_f32f73958c7d4cd99fa307bce2e0403a.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductAddToCart.cshtml:line 140 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate() ClientConnectionId:018f0862-5ed5-493f-8ca1-b765324d3373 Error Number:9002,State:2,Class:17
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 @using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites 4 5 6 @{ 7 ProductViewModel product = null; 8 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 9 { 10 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 11 } 12 else if (Pageview.Item["DummyProduct"] != null) 13 { 14 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 15 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 16 17 if (productList?.Products is object) 18 { 19 product = productList.Products[0]; 20 } 21 } 22 23 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 24 bool anonymousUser = Pageview.User == null; 25 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 26 bool hideAddToCart = anonymousUsersLimitations.Contains("cart") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHideAddToCart") && isErpConnectionDown; 27 hideAddToCart = Pageview.IsVisualEditorMode ? false : hideAddToCart; 28 29 } 30 31 @if (product is object && !hideAddToCart) { 32 33 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 34 horizontalAlign = horizontalAlign == "center" ? "justify-content-center" : horizontalAlign; 35 horizontalAlign = horizontalAlign == "end" ? "justify-content-end" : horizontalAlign; 36 horizontalAlign = horizontalAlign == "full" ? "" : horizontalAlign; 37 38 bool favoritesSelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowAddToFavorites")) ? Model.Item.GetBoolean("ShowAddToFavorites") : false; 39 bool quantitySelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowQuantitySelector")) ? Model.Item.GetBoolean("ShowQuantitySelector") : false; 40 bool unitsSelector = !string.IsNullOrEmpty(Model.Item.GetString("ShowUnitsSelector")) ? Model.Item.GetBoolean("ShowUnitsSelector") : false; 41 bool hideInventory = !string.IsNullOrEmpty(Model.Item.GetString("HideInventory")) ? Model.Item.GetBoolean("HideInventory") : false; 42 bool hideStockState = !string.IsNullOrEmpty(Model.Item.GetString("HideStockState")) ? Model.Item.GetBoolean("HideStockState") : false; 43 44 string buttonSize = Model.Item.GetRawValueString("ButtonSize", "regular"); 45 string inputSize = string.Empty; 46 47 switch (buttonSize) 48 { 49 case "small": 50 inputSize = " input-group-sm"; 51 buttonSize = " btn-sm"; 52 break; 53 case "regular": 54 buttonSize = string.Empty; 55 break; 56 case "large": 57 inputSize = " input-group-lg"; 58 buttonSize = " btn-lg"; 59 break; 60 } 61 62 string iconPath = "/Files/icons/"; 63 string url = "/Default.aspx?ID=" + (GetPageIdByNavigationTag("CartService")); 64 if (!url.Contains("LayoutTemplate")) 65 { 66 url += url.Contains("?") ? "&LayoutTemplate=Swift_MiniCart.cshtml" : "?LayoutTemplate=Swift_MiniCart.cshtml"; 67 } 68 69 string disableAddToCart = (product.StockLevel <= 0) ? "disabled" : ""; 70 bool isNeverOutOfStock = product.NeverOutOfstock; 71 disableAddToCart = isNeverOutOfStock ? "" : disableAddToCart; 72 73 string whenVariantsExist = Model.Item.GetRawValueString("WhenVariantsExist", "hide"); 74 75 string flexFill = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "flex-fill" : ""; 76 string fullWidth = Model.Item.GetRawValueString("HorizontalAlignment", "") == "full" ? "w-100" : ""; 77 string addToCartIcon = Model.Item.GetRawValueString("Icon", iconPath + "shopping-cart.svg"); 78 string addToCartLabel = !addToCartIcon.Contains("_none") ? "<span class=\"icon-2\">" + ReadFile(addToCartIcon) + "</span>" : ""; 79 addToCartLabel += !addToCartIcon.Contains("_none") && !Model.Item.GetBoolean("HideButtonText") ? " " : ""; 80 addToCartLabel += !Model.Item.GetBoolean("HideButtonText") ? Translate("Add to cart") : ""; 81 string imagePath = product?.DefaultImage?.Value ?? ""; 82 imagePath = Dynamicweb.Context.Current.Server.UrlEncode(imagePath); 83 string ratio = Model.Item.GetRawValueString("ImageAspectRatio", ""); 84 ratio = ratio != "0" ? ratio : ""; 85 string ratioCssClass = ratio != "" ? " ratio" : ""; 86 string ratioVariable = ratio != "" ? "--bs-aspect-ratio: " + ratio : ""; 87 88 string width = Model.Item.GetRawValueString("Width", "auto"); 89 int smallImageSize = 640; 90 int largeImageSize = width == "auto" ? 1280 : Convert.ToInt32(width); 91 string imagePathXs = "/Admin/Public/GetImage.ashx?width=" + smallImageSize + "&image=" + imagePath + "&format=webp"; 92 string imagePathS = "/Admin/Public/GetImage.ashx?width=" + largeImageSize + "&image=" + imagePath + "&format=webp"; 93 string imagePathFallBack = "/Admin/Public/GetImage.ashx?width=" + largeImageSize + "&image=" + imagePath + "&format=webp"; 94 95 96 if (product.VariantInfo.VariantInfo == null || whenVariantsExist == "disable") { 97 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : product.DefaultUnitId; 98 if (string.IsNullOrEmpty(unitId) && product?.UnitOptions != null) { 99 if (product.UnitOptions.FirstOrDefault<UnitOptionViewModel>() != null) { 100 unitId = product.UnitOptions.FirstOrDefault<UnitOptionViewModel>().Id; 101 } 102 } 103 104 string minQty = product.PurchaseMinimumQuantity != 1 ? "min=\"" + product.PurchaseMinimumQuantity.ToString() + "\"" : "min=\"1\""; 105 string stepQty = product.PurchaseQuantityStep > 1 ? product.PurchaseQuantityStep.ToString() : "1"; 106 string valueQty = product.PurchaseMinimumQuantity > product.PurchaseQuantityStep ? product.PurchaseMinimumQuantity.ToString() : stepQty; 107 disableAddToCart = product.VariantInfo.VariantInfo != null && string.IsNullOrEmpty(product.VariantId) ? "disabled" : disableAddToCart; 108 109 var reserveMode = Dynamicweb.Ecommerce.Frontend.Cart.ProductReserve.Mode; 110 111 112 //IvanM 15.04.2024. - Adding default box to cart setup field 113 //------------------------------------------------------------------ 114 string DefaultBoxProductId = null; 115 Dynamicweb.Ecommerce.Products.Product boxProduct = null; 116 117 118 if (product.ProductFields.ContainsKey("DefaultBox")) 119 { 120 if (product.ProductFields["DefaultBox"] != null) 121 { 122 DefaultBoxProductId = product.ProductFields["DefaultBox"].Value.ToString(); 123 if (DefaultBoxProductId != null) 124 { 125 var dwProductServices = Dynamicweb.Ecommerce.Services.Products; 126 boxProduct = dwProductServices.GetProductById(DefaultBoxProductId, product.VariantId, product.LanguageId); 127 } 128 129 } 130 } 131 //------------------------------------------------------------------ 132 //IvanM 15.04.2024. - Adding default box to cart setup field -- end 133 134 if (unitsSelector && product.UnitOptions.Count > 0) { 135 <form method="post" action="/Default.aspx?ID=@(Pageview.Page.ID)&ProductId=@product.Id" id="UnitSelectorForm_@(product.Id)_@(product.VariantId)_@Model.ID"> 136 <input type="hidden" name="redirect" value="false"> 137 <input type="hidden" name="VariantID" value="@product.VariantId"> 138 <input type="hidden" name="UnitID" class="js-unit-id" value="@unitId"> 139 </form> 140 } 141 142 <div class="@DefaultBoxProductId d-flex @horizontalAlign @fullWidth js-input-group item_@Model.Item.SystemName.ToLower()"> 143 <form method="post" action="@url" class="@fullWidth" style="z-index: 1"> 144 <input type="hidden" name="redirect" value="false"> 145 <input type="hidden" name="ProductId" value="@product.Id"> 146 <input type="hidden" name="ProductName" value="@product.Name"> 147 <input type="hidden" name="ProductVariantName" value="@product.VariantName"> 148 <input type="hidden" name="ProductCurrency" value="@Dynamicweb.Ecommerce.Common.Context.Currency.Code"> 149 <input type="hidden" name="ProductPrice" value="@PriceViewModelExtensions.ToStringInvariant(product.Price)"> 150 <input type="hidden" name="ProductReferer" value="component_ProductAddToCart"> 151 <input type="hidden" name="cartcmd" value="add"> 152 @if(boxProduct!=null){ 153 <input type="hidden" name="EcomOrderLineFieldInput_LinkedItem" value="@boxProduct.Id"> 154 } 155 156 @if (reserveMode == Dynamicweb.Ecommerce.Frontend.Cart.ProductReserveMode.AddToCart) 157 { 158 <input type="hidden" name="GetReservedAmount" value="true"> 159 } 160 161 @if (!string.IsNullOrEmpty(product.VariantId)) 162 { 163 <input type="hidden" name="VariantId" value="@product.VariantId"> 164 } 165 166 @if (!product.NeverOutOfstock) 167 { 168 <input type="hidden" name="Stock" value="@product.StockLevel"> 169 170 <template class="js-out-of-stock-notice"> 171 <div class="modal-header"> 172 <h1 class="modal-title fs-5">@Translate("Stock limit")</h1> 173 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> 174 </div> 175 <div class="modal-body"> 176 @Translate("There are not enough products in stock. The product might be sold out or discontinued. Please adjust the quantity.") 177 </div> 178 </template> 179 } 180 181 @if (stepQty != "1") 182 { 183 <template class="js-step-quantity-warning"> 184 <div class="modal-header"> 185 <h1 class="modal-title fs-5">@Translate("The quantity is not valid")</h1> 186 </div> 187 <div class="modal-body"> 188 @Translate("Please select a quantity that is dividable by") @stepQty 189 </div> 190 </template> 191 } 192 @if (product.PurchaseMinimumQuantity != 1) 193 { 194 <template class="js-min-quantity-warning"> 195 <div class="modal-header"> 196 <h1 class="modal-title fs-5">@Translate("The product could not be added to the cart")</h1> 197 </div> 198 <div class="modal-body"> 199 @Translate("The quantity is not valid. You must buy at least") @product.PurchaseMinimumQuantity 200 </div> 201 </template> 202 } 203 204 @if (quantitySelector || (!anonymousUser && product.VariantInfo.VariantInfo != null) || (!anonymousUser && favoritesSelector)) 205 { 206 <input type="hidden" id="Unit_@(product.Id)_@product.VariantId" name="UnitID" value="@unitId" /> 207 } 208 209 <div class="d-flex flex-row w-100"> 210 @if (!anonymousUser && favoritesSelector) 211 { 212 @RenderPartial("Components/ToggleFavorite.cshtml", product) 213 } 214 215 @if (!quantitySelector) 216 { 217 <input id="Quantity_@(product.Id)_@product.VariantId" name="Quantity" value="@valueQty" type="hidden" @disableAddToCart> 218 } 219 220 <div class="input-group input-primary-button-group flex-nowrap@(inputSize)"> 221 @if(product.StockLevel>0){ 222 if (quantitySelector) 223 { 224 <input id="Quantity_@(product.Id)_@product.VariantId" name="Quantity" value="@valueQty" step="@stepQty" @minQty class="form-control swift_quantity-field AddToCardButton" style="min-width: 60px; max-width: 100px; z-index: 1" type="number" onchange="swift.Cart.UpdateOnEnterKey(event)" onkeyup="swift.Cart.UpdateOnEnterKey(event)" @disableAddToCart> 225 } 226 227 if (unitsSelector && product.UnitOptions.Count > 0) 228 { 229 string selectedUnitName = !string.IsNullOrEmpty(unitId) && product?.UnitOptions != null ? unitId : product.UnitOptions.FirstOrDefault<UnitOptionViewModel>().Name; 230 231 foreach (var unitOption in product.UnitOptions) 232 { 233 if (unitOption.Id == unitId) 234 { 235 selectedUnitName = unitOption.Name; 236 } 237 } 238 239 <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> 240 @selectedUnitName 241 </button> 242 <ul class="dropdown-menu swift_unit-field"> 243 @foreach (var unitOption in product.UnitOptions) 244 { 245 var selectedUnit = unitOption.Id == unitId ? "selected" : ""; 246 247 <li> 248 <button type="button" class="btn dropdown-item" data-value="@unitOption.Id" onclick="document.querySelector('#UnitSelectorForm_@(product.Id)_@(product.VariantId)_@Model.ID').querySelector('.js-unit-id').value = this.getAttribute('data-value'); 249 document.querySelector('#Unit_@(product.Id)_@product.VariantId').value = this.getAttribute('data-value'); 250 swift.PageUpdater.Update(document.querySelector('#UnitSelectorForm_@(product.Id)_@(product.VariantId)_@Model.ID'))"> 251 <span>@unitOption.Name</span> 252 <span> 253 @if (unitOption.StockLevel > 0) 254 { 255 if (!Model.Item.GetBoolean("HideInventory")) 256 { 257 <span class="small text-success">@unitOption.StockLevel @Translate("In stock")</span> 258 } 259 else 260 { 261 <span class="small text-success">@Translate("In stock")</span> 262 } 263 } 264 else 265 { 266 <span class="small text-danger">@Translate("Out of Stock")</span> 267 } 268 </span> 269 </button> 270 </li> 271 } 272 </ul> 273 } 274 275 <button type="button" onclick="swift.Cart.Update(event); AddToCartInfo()" class="btn btn-secondary @(buttonSize) @flexFill js-add-to-cart-button" style="white-space: nowrap" @disableAddToCart title="@Translate("Add to cart")" id="AddToCartButton@(product.Id)_@Pageview.CurrentParagraph.ID"> 276 @if (!Model.Item.GetBoolean("HideButtonText")) 277 { 278 <span class="text-nowrap d-flex align-items-center justify-content-center gap-2"> 279 @addToCartLabel 280 </span> 281 } 282 else 283 { 284 @addToCartLabel 285 } 286 </button> 287 <div aria-live="polite" aria-atomic="true"> 288 <div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11"> 289 <div id="AddToCartInfo" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true" autohide="true"> 290 <div class="toast-header"> 291 <strong class="me-auto">@Translate("Product is added to the cart")</strong> 292 <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> 293 </div> 294 <div class="toast-body d-flex gap-3"> 295 <div id="AddToCartInfoNotificationToast_Image"><img src="@imagePathXs" style="width:100px;"></div> 296 <div id="AddToCartInfoNotificationToast_Text" >@(product.Name)<br> 297 @(product.Id)</div> 298 </div> 299 </div> 300 </div> 301 </div> 302 <script> 303 function AddToCartInfo() { 304 document.getElementById("AddToCartInfo").classList.add("show"); 305 setTimeout(function() { 306 document.getElementById("AddToCartInfo").classList.remove("show"); 307 }, 3000); 308 } 309 </script> 310 311 312 313 314 315 } else { 316 317 <div class="productNotAvailable text-nowrap d-flex align-items-center justify-content-center gap-2">@Translate("This product is currently not available.")</div> 318 319 } 320 </div> 321 </div> 322 </form> 323 </div> 324 } else if (whenVariantsExist == "modal") { 325 string buttonText = Translate("Select"); 326 327 string variantSelectorServicePageId = !string.IsNullOrEmpty(Model.Item.GetString("VariantSelectorServicePageId")) ? Model.Item.GetLink("VariantSelectorServicePageId").PageId.ToString() : ""; 328 variantSelectorServicePageId = variantSelectorServicePageId != "" ? variantSelectorServicePageId : GetPageIdByNavigationTag("VariantSelectorService").ToString(); 329 330 <div class="d-flex @horizontalAlign w-100 item_@Model.Item.SystemName.ToLower()"> 331 @if (!anonymousUser && favoritesSelector) 332 { 333 @RenderPartial("Components/ToggleFavorite.cshtml", product) 334 } 335 <form action="/Default.aspx?ID=@variantSelectorServicePageId" data-response-target-element="DynamicModalContent" data-preloader="inline" style="z-index: 1" class="@fullWidth"> 336 <input type="hidden" name="ProductID" value="@product.Id"> 337 <input type="hidden" name="QuantitySelector" value="@quantitySelector.ToString()"> 338 <input type="hidden" name="HideInventory" value="@hideInventory.ToString()"> 339 <input type="hidden" name="HideStockState" value="@hideStockState.ToString()"> 340 <input type="hidden" name="VariantSelectorServicePage" value="@variantSelectorServicePageId"> 341 <input type="hidden" name="ViewType" value="ModalContent"> 342 <button type="button" onclick="swift.PageUpdater.Update(event)" class="btn btn-primary@(buttonSize) @fullWidth" title="@Translate("Select")" data-bs-toggle="modal" data-bs-target="#DynamicModal" id="OpenVariantSelectorModal@(product.Id)_@Pageview.CurrentParagraph.ID">@buttonText</button> 343 </form> 344 </div> 345 } 346 } else if (Pageview.IsVisualEditorMode) { 347 <div class="alert alert-dark m-0">@Translate("No products available")</div> 348 }
+ PRODUCT INFO
Design: Classic
Pocket: No
Fit: Tailored
Buttoning: Placker with single stitiching
Collar: Classic collar
Model: Tailored
Motif: Small shapes
Cuff: Round cut cuff with single button
Colour: Light blue
Product: Dress shirt
Sleeve: Long sleeve
Brand: CROATA
Material composition : Cotton 100%
+ FABRIC AND CARE
Finishing: Easy ironing
Maintenance: Machine washing 30C, sensitive fabric
Producer: Potomac Grupa d.o.o., Trg kralja Tomislava 4, 10000 Zagreb, RH
Shrinkage: -2% by length and width
Production technique: Jacquard
Pattern: One coloured
Material composition : Cotton 100%
Material type: Fish bone